/******************************************************************************************
 * Import
 ******************************************************************************************/

// module
import React, {Component} from 'react';
import { View, Dimensions, ScrollView } from 'react-native';

// project
import {
	TouchOpacity, Image, Text, Between
} from '../../../library';

/******************************************************************************************
 * Export Class
 ******************************************************************************************/

export default class MakeModule extends Component {

	constructor(props) {
		super(props);

		/**
		 * state
		 */
		this.state = {
            text:'测图测图测图测图测图测图测图测图测图测图测图测图图测图测图测图测图测图测图测图测图测图测图测图测图测图测图测图测图测图测图图测图测图测图测图测图测图测图测图测图测图测图测图测图测图测图测图测图测图图测图测图测图测图测图测图测图测图测图测图测图测图测图测图测图测图测图测图图测图测图测图测图测图测图'
		}
    }
    
    /*------------------------------------------------------------------------------------
	 * 自定义方法
	 *-----------------------------------------------------------------------------------*/
    /**
     * 
     */

	/**
	 * 渲染
	 */
	render() {
        // 制作样式
		const windowWidth = Dimensions.get('window').width;

		const DonPress = this.props.DonPress? this.props.DonPress : {};
		const IonPress = this.props.IonPress? this.props.IonPress : {};
		const TonPress = this.props.TonPress? this.props.TonPress : {};

		// 渲染
		return (
			<View style={{width:windowWidth,paddingLeft:10,paddingRight:10,height:126}}>
                <View style={{flex:1,backgroundColor:'#fff',borderRadius:8,paddingTop:6,paddingLeft:6,borderWidth:1,borderColor:'#f0eff4'}}>
					<TouchOpacity onPress={
						()=>{DonPress}
					}>
						<Image source={require('../../../assets/cancel.png')} w='8' h='8' mb='2'></Image>
					</TouchOpacity>
                    <Between h='100' pl='14' pr='20' pb='26' y='top' f='1'>
                        <TouchOpacity w='74' df onPress={
							()=>{IonPress}
						}>
							<Image source={require('../../../assets/text.png')} w='74' h='74'/>
						</TouchOpacity>
                        <TouchOpacity h='74' f='1' ml='8' onPress={
							()=>{TonPress}
						}>
							<ScrollView>
								<Text oh lh='19'>{this.props.text ? this.props.text : (<Text color='#aaa'>点击可输入文字</Text>)}</Text>
							</ScrollView>
						</TouchOpacity>
                    </Between>
                </View>
			</View>
		);
	}
};

